﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DAL;
using Model;

namespace BLL
{
    public class GoodsClassfyBll
    {
        GoodsClassfyDal gc = new GoodsClassfyDal();
        public DataTable GetDt(string condition)
        {
            return gc.GetDt(condition);
        }
        public List<MGoodsClassfy> ListClass(string condition)
        {
            return gc.ListClass(condition);
        }
        //
        public int Add(DataTable dt)
        {
            return gc.Add(dt);
        }

        public int Update(DataRow dr)
        {
            return gc.Update(dr);
        }

        public int Del(int id)
        {
            return gc.Del(id);
        }

        /// <summary>
        /// 保存数据
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="delIds"></param>
        /// <returns></returns>
        public bool Save(List<MGoodsClassfy> list, string delIds, int sellerId)
        {
            return gc.Save(list, delIds, sellerId);
        }

        /// <summary>
        /// 获得分类，按照父子排序
        /// </summary>
        /// <param name="mclass"></param>
        /// <returns></returns>
        public List<MGoodsClassfy> ListClassByGroup(MGoodsClassfy mclass)
        {
            return gc.ListClassByGroup(mclass);
        }
        
    }
}
